
'use strict';

/**
	Part of Zombie Navigator
	Copyright © 2016  Zombie Navigator Developers
	
	@file
	@license AGPL-3.0+
	
	Not included in builds
*/


const _pEnv = require('./platform/env');
const _pMeta = require('./platform/meta');

const ENV_NAME_ENABLE_TEST_SCRIPT = 'ENABLE_TEST_SCRIPT';
if (_pEnv.has(ENV_NAME_ENABLE_TEST_SCRIPT)) {
	let obj;
	require('./platform/ui-factory')
	.openPopup('about:', false, _pMeta.getURIFromDataPath('debug/dummy.js'), {
		command1 (data) {
			console.info('command1!', data);
			console.info('obj:', obj);
		}
	})
	.then(t => {
		t.sendMessage('This is the message');
		console.info('sdkWindow:', t._sdkWindow);
		obj = t;
	})
	.catch(e => console.exception(e));
	
	require('./platform/downloader').download('data:;base64,SGVsbG8sIHdvcmxkIQo=', 'hello.txt')
	.then(path => {
		console.log('file downloaded:', path);
	})
	.catch(e => {
		console.error(e);
	});
	
	console.log('tmp:', require('sdk/system').pathFor('TmpD')); // TMPDIR or /tmp
	
}

// vim: ts=4 noet ai

